#ifndef RGB_H
#define RGB_H

#include "pinctrl.h"
#include "pwm.h"
#include "osal_debug.h"
#include "cmsis_os2.h"
#include "app_init.h"
#include "tcxo.h"

#define PWM_MODE                 1
#define RGB_GROUP_ID                 0
#define TEST_TCXO_DELAY_1000MS       1000

// /* 颜色通道定义 */
// #define RGB_RED     0
// #define RGB_GREEN   1
// #define RGB_BLUE    2
/* PWM周期（单位：时钟节拍数） */
#define PWM_PERIOD  1000

typedef struct {
    pwm_config_t pwm_cfg_r;
    pwm_config_t pwm_cfg_g;
    pwm_config_t pwm_cfg_b;
} rgb_drv_t;
/* 公共接口函数 */
void RGB_Init(void);
void RGB_Deinit(void);
void RGB_SetDutyCycle(uint8_t channel, float duty_cycle);
void RGB_SetColor(uint8_t red, uint8_t green, uint8_t blue);

#endif


